<template>
	<view class="u-m-t-20">
		<view v-for="(items, index) in list" :key="index"
			class="s-flex u-width-100 u-back-white u-common-shadow u-m-b-30 u-p-t-36 u-p-b-26 u-p-r-26 u-p-l-26 u-radius-10">
			<u-image height="180" width="180" mode="aspectFill" border-radius="20" :src="items.image"></u-image>
			<view class="u-flex-1 u-p-l-20">
				<view class="u-flex">
					<view class="u-flex-col u-flex-1">
						<text class="u-font-30 u-font-bold">{{ items.name }}</text>
						<text v-if="type == 2 || (type == 1 && items.t_status == 3)" class="u-font-24 u-color-gray u-m-t-20">开始时间：{{items.start_time}}</text>
						<text v-if="type == 2 || (type == 1 && items.t_status == 3)" class="u-font-24 u-color-gray u-m-t-5">结束时间：{{items.end_time}}</text>
					</view>
					<view v-if="type == 2 || (type == 1 && items.t_status == 3)" @click="onAdvertCxd(items)" class="u-font-28 u-color-puce">续费 ></view>
				</view>
				<view v-if="type == 1" class="u-m-t-40">
					<u-tag v-if="items.t_status == 1" text="审核中" bg-color="#ed693fFF" shape="circle" type="primary" mode="dark" />
					<u-tag v-if="items.t_status == 2" text="未到时间还没投放" bg-color="#ed693fFF" shape="circle" type="primary" mode="dark" />
				</view>
				<view v-if="type == 3" class="u-m-t-40">
					<u-tag v-if="items.t_status == 1" text="审核不通过" bg-color="#909399" shape="circle" type="primary" mode="dark" />
					<u-tag v-if="items.t_status == 2" text="超过结束时间" bg-color="#909399" shape="circle" type="primary" mode="dark" />
				</view>
				<view v-if="type == 2 || (type == 1 && items.t_status == 3)" class="u-flex u-row-between u-m-t-32 u-font-26">
					<view class="u-flex-col u-text-center">
						<text class="u-color-puce">{{ items.views }}</text>
						<text class="u-color-gray u-p-t-14">展示量</text>
					</view>
					<view class="u-flex-col u-text-center">
						<text class="u-color-puce">{{ items.onclick }}</text>
						<text class="u-color-gray u-p-t-14">点击量</text>
					</view>
					<view class="u-flex-col u-text-center">
						<text class="u-color-puce">{{ items.end_num }}</text>
						<text class="u-color-gray u-p-t-14">消耗量</text>
					</view>
					<view class="u-flex-col u-text-center">
						<text class="u-color-puce">{{ items.put_num }}</text>
						<text class="u-color-gray u-p-t-14">投放量</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: ['list', 'type'],
		methods: {
			onAdvertCxd(item) {
				this.$emit("onAdvertCxd", item.id)
			}
		}
	}
</script>

<style lang="scss">
</style>